ApiKeyAuth

interface ApiKeyAuth

Exposes functionality for a user to manage API keys under their control.

Functions

create
Link copied to clipboard
abstract suspend fun create(name: String): ApiKey
Creates a user API key that can be used to authenticate as the user.
delete
Link copied to clipboard
abstract suspend fun delete(id: ObjectId)
Deletes a specific API key created by the user.
abstract suspend fun delete(id: BsonObjectId)
Deletes a specific API key created by the user.
disable
Link copied to clipboard
abstract suspend fun disable(id: ObjectId)
Deletes a specific API key created by the user.
abstract suspend fun disable(id: BsonObjectId)
Deletes a specific API key created by the user.
enable
Link copied to clipboard
abstract suspend fun enable(id: ObjectId)
Enables a specific API key created by the user.
abstract suspend fun enable(id: BsonObjectId)
Enables a specific API key created by the user.
fetch
Link copied to clipboard
abstract suspend fun fetch(id: ObjectId): ApiKey?
Fetches a specific user API key associated with the user.
abstract suspend fun fetch(id: BsonObjectId): ApiKey?
Fetches a specific user API key associated with the user.
fetchAll
Link copied to clipboard
abstract suspend fun fetchAll(): List<ApiKey>
Fetches all API keys associated with the user.

Properties

app
Link copied to clipboard
abstract val app: App
The App that this instance in associated with.
user
Link copied to clipboard
abstract val user: User
The User that this instance in associated with.